//original.js
Page({
  data: {
    
  },
  onLoad: function () {
    fetchData(this);
  },
  all: function () {
    wx.navigateBack({})
  }
});


function fetchData(page){
  wx.request({
    url: 'http://www.bilibili.com/index/catalogy/11-3day.json',
    method: 'GET', 
    success: function(res){
      console.log(res.data);
      page.setData({
        videos: res.data.hot_original.list
      })
    },
    fail: function() {
      console.log("获取数据错误。");
      alert("获取数据错误。");
    }
  })
}